<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class new_allocator&lt;void&gt;</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.new__allocator_8hpp" title="Header &lt;boost/container/new_allocator.hpp&gt;">
<link rel="prev" href="structboost_1_1container_1_1new__allocator_1_1rebind.html" title="Struct template rebind">
<link rel="next" href="structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind.html" title="Struct rebind">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1container_1_1new__allocator_1_1rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.new__allocator_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class new_allocator&lt;void&gt;</span></h2>
<p>boost::container::new_allocator&lt;void&gt; — Specialization of <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> for void types. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.new__allocator_8hpp" title="Header &lt;boost/container/new_allocator.hpp&gt;">boost/container/new_allocator.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html" title="Class new_allocator&lt;void&gt;">new_allocator</a><span class="special">&lt;</span><span class="keyword">void</span><span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="keyword">void</span>                   <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1acb0a9dda58485b51462f8ef482268467"></a><span class="identifier">value_type</span><span class="special">;</span>                            
  <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="special">*</span>                 <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1ab68f916efb7b0ffcf9772cc66f5aea3d"></a><span class="identifier">pointer</span><span class="special">;</span>                               
  <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span>           <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a4ddaa3b5714ef0073ce7527f4214d554"></a><span class="identifier">const_pointer</span><span class="special">;</span>                         
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1af1b58e523751e695bed701bd8da419af"></a><span class="identifier">propagate_on_container_move_assignment</span><span class="special">;</span>  <span class="comment">// A integral constant of type bool with value true. </span>
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1ab37598280dfcb8af82a5843998ad2804"></a><span class="identifier">is_always_equal</span><span class="special">;</span>                         <span class="comment">// A integral constant of type bool with value true. </span>

  <span class="comment">// member classes/structs/unions</span>
  
  <span class="keyword">struct</span> <a class="link" href="structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind.html" title="Struct rebind">rebind</a> <span class="special">{</span>
    <span class="comment">// types</span>
    <span class="keyword">typedef</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <a class="link" href="structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind.html#doxygen.boost_container_header_reference.structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind_1a3ad3d1dfa040c92f2a35fdc63a01d76b"><span class="identifier">other</span></a><span class="special">;</span>
  <span class="special">}</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#id65-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a93cee6a644d901d189f14b4c166aa2f6"><span class="identifier">new_allocator</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a5a234c7d53ee2924fd10f83b191b7beb"><span class="identifier">new_allocator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a23492568c571caa8a347ab2385899ee8"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T2<span class="special">&gt;</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a7038bb52b1845439c0770e2e826ac42e"><span class="identifier">new_allocator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#id66-bb">friend functions</a></span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1afb7b628d6f888d9ecc2bf549558521d3"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1ab22812f44758b003493ca6dc6d6d0440"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1container_1_1new__allocator_3_01void_01_4.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a93d2b46b916a348664dee7be84ca044d"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.8.14.18.4.4"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.3.8.14.18.4.4.2"></a><h3>
<a name="id65-bb"></a><code class="computeroutput">new_allocator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a93cee6a644d901d189f14b4c166aa2f6"></a><span class="identifier">new_allocator</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Default constructor Never throws </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a5a234c7d53ee2924fd10f83b191b7beb"></a><span class="identifier">new_allocator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Constructor from other <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a>. Never throws </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a23492568c571caa8a347ab2385899ee8"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Copy assignment operator from other <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a>. Never throws </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T2<span class="special">&gt;</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a7038bb52b1845439c0770e2e826ac42e"></a><span class="identifier">new_allocator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Constructor from related <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a>. Never throws </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.8.14.18.4.4.3"></a><h3>
<a name="id66-bb"></a><code class="computeroutput">new_allocator</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1afb7b628d6f888d9ecc2bf549558521d3"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Swaps two allocators, does nothing because this <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> is stateless </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1ab22812f44758b003493ca6dc6d6d0440"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>An <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> always compares to true, as memory allocated with one instance can be deallocated by another instance </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1new__allocator_3_01void_01_4_1a93d2b46b916a348664dee7be84ca044d"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>An <a class="link" href="classboost_1_1container_1_1new__allocator.html" title="Class template new_allocator">new_allocator</a> always compares to false, as memory allocated with one instance can be deallocated by another instance </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2009-2018 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1container_1_1new__allocator_1_1rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.new__allocator_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1container_1_1new__allocator_3_01void_01_4_1_1rebind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
